<%@page import="java.util.Date"%>
<%@page import="com.xuerhua.yxt.utils.DateUtil"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
	String basePath = request.getScheme() + "://" + request.getServerName()
			+ ":" + request.getServerPort() + request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>${signupType }打印</title>
  <style media="print">
	  @page {
	   size: auto;
	   margin: 0mm;
	  }
  </style>
  <link href="<%=basePath %>/style/print.css" rel="stylesheet">
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
	<div id="startPrint" onclick="startPrint()">打印</div>
	<div style="page-break-after:always;">
    <!--startprint-->
    <c:forEach var="itm" items="${list }">
      <div style="width:1000px;margin:auto;page-break-after:always;">
    	<h1 style="text-align: center;padding-top:20px;" >培立实验小学插班生报名表</h1>
	    <br>
	    <br>
	    <div class="class" align="center" style= "text-align: left;">
		  <table style="width:1080px;">
		  	<tr>
		  		<th><font size="5" >报名学校: 培立实验小学</font></th>
		  		<th><font size="5" >报名号: ${itm.signupNo }</font></th>
		  	</tr>
		  </table>
		  <br/>
	        <table class="table table-bordered cr" border="1">
			<tr>		    
	              <td colspan="8" align="center">   
	                     <h3><label>一、基本资料</label></h3>	  
	              </td>
		    </tr>
	        <tr>
	              <td width="13%" ><label >姓名</label></td>
	              <td width="12%"><label>${itm.studentName }</label></td>
	              <td width="13%" ><label >性别</label></td>
	              <td width="12%"><label>${itm.studentSex }</label></td>
	              <td width="13%" ><label >入读年级</label></td>
	              <td width="18%" colspan="2"><label>${itm.signGrade }</label></td>
				  <td rowspan="3" width="19%">照片</td>
	         </tr>
			 <tr>
	              <td ><label >出生年月</label></td>
	              <td ><label>${itm.studentBirthday }</label></td>
	              <td ><label >身体状况</label></td>
	              <td ><label>${itm.healthy }</label></td>
	              <td ><label >原就读学校</label></td>
	              <td  colspan="2"><label>${itm.baseSchool }</label></td>			 
	         </tr>
			  <tr> 
			      <td ><label >身份证号码</label></td>
				  <td colspan="2" style="text-align:left !important;"><label>${itm.studentIdNo }</label></td>           
	              <td ><label >民族</label></td>
	              <td ><label>${itm.nation }</label></td>
	              <td width="9%"><label >籍  贯</label></td>
	              <td width="9%"><label>${itm.nativePlace }</label></td>					 
	         </tr>
			 <tr>
	              <td ><label >户籍所在地</label></td>
	              <td colspan="3" style="text-align:left !important;"><label>${itm.houseSSQ }</label></td>
				  <td><label >户口所在镇街</label></td>
	              <td colspan="3" style="text-align:left !important;"><label>${itm.houseAddr }</label></td>
	          </tr>
			  <tr>  
			  	<td> <label >家庭地址</label > </td>
			  	<td colspan="7" style="text-align:left !important;"><label>${itm.familyAddr }</label></td>
			  </tr>
			  
			  
			  
			  <tr>		    
	              <td colspan="8" >   
	                     <h3><label > 二、家庭主要成员资料</label></h3>	  
	              </td>
		    </tr>
			 <tr>
	              <td ><label >关 系</label></td>
	              <td style="font-weight:bold"><label >姓 名</label></td>
	              <td colspan="3" ><label >工作单位</label></td>
	              <td colspan="2" ><label >手机</label></td>
	              <td ><label >固定电话</label></td>            
	         </tr>
			 <tr><td><label>爸爸</label></td><td><label>${itm.fatherName }</label></td><td colspan="3"><label>${itm.fatherCompany }</label></td><td colspan="2"><label>${itm.fatherPhone }</label></td><td></td></tr>
			 <tr><td><label>妈妈</label></td><td><label>${itm.motherName }</label></td><td colspan="3"><label>${itm.motherCompany }</label></td><td colspan="2"><label>${itm.motherPhone }</label></td><td></td></tr>
			 <tr><td></td><td></td><td colspan="3"></td><td colspan="2"></td><td></td></tr>
	
	
	
			 <tr>		    
	              <td colspan="8">   
	                     <h3><label >  三、就读方式（请打√）</label></h3>	  
	              </td>
		    </tr>
	        <tr>
	              <td ><label >1. 走读</label></td>
	              <td >17:30放学</td>
	              <td colspan="2"><c:if test="${itm.schoolStudyType == 1}">√</c:if></td>
	              <td ><label >3.住宿</label></td>
	              <td colspan="2">周日19:00上学<br/>周五16:10放学</td>  
	              <td ><c:if test="${itm.schoolStudyType == 3}">√</c:if></td>	  
	         </tr>
			 <tr>
	              <td ><label >2.晚修后走读</label></td>
	              <td colspan="2">20：00放学<br/>（一年级）</td>
	              <td><c:if test="${itm.schoolStudyType == 2 && (fn:indexOf(itm.signGrade, '一年级') != -1)}">√</c:if></td>
	              <td colspan="3">20:30放学<br/>（二、三、四、五年级）</td>          
	              <td ><c:if test="${itm.schoolStudyType == 2 && (fn:indexOf(itm.signGrade, '二年级') != -1 || fn:indexOf(itm.signGrade, '三年级') != -1 || fn:indexOf(itm.signGrade, '四年级') != -1 || fn:indexOf(itm.signGrade, '五年级') != -1)}">√</c:if></td>	  
	         </tr>
	         
		  </table>
		  <br/>
		  <br/>
		  <br/>
		   <br/>
		  <table style="width:1080px;">
		  	<tr>
		  		<td><font size="5" >家长（监护人）签名                </font></td>
		  		<td><font size="5" >&emsp;&emsp;&emsp;年&emsp;&emsp;&emsp;&emsp;月&emsp;&emsp;&emsp;&emsp;日</font></td>
		  	</tr>
		  </table>
		   </div>
		  </div>
    </c:forEach>
    <div style="width:1000px;margin:auto;page-break-after:always;">
    </div>
    <!--endprint-->
    </div>
    <script src="<%=basePath %>/js/plugin/jquery-2.1.4.min.js"></script>
    <script type="text/javascript">
    	$(function() {
    		setTimeout(function(){
    			startPrint();
    			$("#startPrint").css("display","block");
    		},1000)
    	})
		function startPrint(){
	    	bdhtml=window.document.body.innerHTML;
	        sprnstr="<!--startprint-->"; //开始打印标识字符串有17个字符
	        eprnstr="<!--endprint-->"; //结束打印标识字符串
	        prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); //从开始打印标识之后的内容
	        prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容
	        window.document.body.innerHTML=prnhtml; //把需要打印的指定内容赋给body.innerHTML
	        window.print(); //调用浏览器的打印功能打印指定区域
	        window.document.body.innerHTML=bdhtml; // 最后还原页面 
	    }
    </script>
</body>
</html>